<?php /* Smarty version Smarty-3.1.16, created on 2017-05-09 16:54:09
         compiled from "E:\blog\App\Back\View\Article\index.html" */ ?>
<?php /*%%SmartyHeaderCode:3997590d2e712c0829-26475847%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '646b72b48185866721af14a575811b420f50f547' => 
    array (
      0 => 'E:\\blog\\App\\Back\\View\\Article\\index.html',
      1 => 1494319516,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '3997590d2e712c0829-26475847',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.16',
  'unifunc' => 'content_590d2e7130b442_25210257',
  'variables' => 
  array (
    'artInfo' => 0,
    'row' => 0,
    'strpage' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_590d2e7130b442_25210257')) {function content_590d2e7130b442_25210257($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'E:/blog/Vendor/Smarty/plugins\\modifier.date_format.php';
?><?php echo $_smarty_tpl->getSubTemplate ('../Public/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<script>
	//定义页面载入事件
	$(function(){
		//获取btnAdd按钮
		$('#btnAdd').bind('click',function(){
			// 设置“添加文章”链接
			window.location.href = 'index.php?p=Back&c=Article&a=add';
		});
	});
    $(function(){
        //获取btnAdd按钮
        $('#btnRecycle').bind('click',function(){
            // 设置“添加文章”链接
            window.location.href = 'index.php?p=Back&c=Article&a=recycle';
        });
    });
</script>

<div class="admin">
	<form action="index.php?p=Back&c=Article&a=delAll" method="POST">
    <div class="panel admin-panel">
    	<div class="panel-head"><strong>文章列表</strong></div>
        <div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="checkall" checkfor="id[]" value="全选" />
            <input type="button" id="btnAdd" class="button button-small border-green" value="添加文章" />
            <input type="submit" class="button button-small border-yellow"  value="批量删除" onclick="return confirm('确定要删除吗?');"/>
            <input type="button" id="btnRecycle" class="button button-small border-blue" value="回收站" />
        </div>
        <table class="table table-hover">
        	<tr>
                <th width="45">选择</th>
                <th width="120">所属类别</th>
                <th width="200">文章标题</th>
                <th width="120">点击率</th>
                <th width="180">发布时间</th>
                <th width="200">是否推荐</th>
                <th width="100">操作</th>
            </tr>
            <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['artInfo']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value) {
$_smarty_tpl->tpl_vars['row']->_loop = true;
?>
            <tr>
                <td><input type="checkbox" name="art_id[]" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
" /></td>
                <td><?php echo $_smarty_tpl->tpl_vars['row']->value['cate_name'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['row']->value['title'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['row']->value['hits'];?>
</td>
                <td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['row']->value['addtime'],'%Y-%m-%d %H:%M:%S');?>
</td>
                <td>
                <?php if ($_smarty_tpl->tpl_vars['row']->value['is_recommend']=='1') {?>
                    <a class="button border-yellow button-little" href="index.php?p=Back&c=Article&a=ifRecommend&art_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
&pageNum=<?php echo (($tmp = @$_GET['pageNum'])===null||$tmp==='' ? 1 : $tmp);?>
&is_recommend=<?php echo $_smarty_tpl->tpl_vars['row']->value['is_recommend'];?>
">已推荐</a>
                <?php } else { ?>
                    <a class="button border-blue button-little" href="index.php?p=Back&c=Article&a=ifRecommend&art_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
&pageNum=<?php echo (($tmp = @$_GET['pageNum'])===null||$tmp==='' ? 1 : $tmp);?>
&is_recommend=<?php echo $_smarty_tpl->tpl_vars['row']->value['is_recommend'];?>
">未推荐</a>
                <?php }?>

                </td>
                <td>
                    <a class="button border-blue button-little" href="index.php?p=Back&c=Article&a=edit&art_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
">修改</a> 
                    <a class="button border-yellow button-little" href="index.php?p=Back&c=Article&a=del&art_id=<?php echo $_smarty_tpl->tpl_vars['row']->value['art_id'];?>
" onclick="return confirm('确定要删除吗?');" >删除</a>
                </td>
            </tr>
            <?php } ?>
        </table>
		<div class="panel-foot text-center">
          <?php echo $_smarty_tpl->tpl_vars['strpage']->value;?>

        </div>
    </div>
    </form>
    <br />
    <p class="text-right text-gray" style="float:right">基于<a class="text-gray" target="_blank" href="#">MVC框架</a>构建</p>
</div>
</body>
</html><?php }} ?>
